<include file="../header" />
<body class="J_scroll_fixed">
<style type="text/css">
    .btn-danger,.btn-info,.btn-success,.btn-warning{
        width: 100px;
        /*height: 18px;*/
        padding: 2px 0px 2px 0px;
        margin: 1px 0px 1px 0px;
    }
</style>
<form class="well form-search" method="post" style="float:left" action="{:U('Messagebox/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：{:getEnumSelectWidget($statusEnum, "mb#status", $status, 1)}
            &nbsp;用户名称：<input type="text" name="cus#nickname-like" value="{$nickname}" />
            产品名称：<select name="mb#product_id"><option value="">请选择</option>{:getProductSelectOptionHtml(0, 0)}</select>
            <br>开始时间：<input type="text" value="{$begin_time}" class="date J_date" name="mb#create_time-egt" />
            截止时间：<input type="text" value="{$end_time}" class="date J_date" name="mb#create_time-elt" />
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn" href="{:U('Messagebox/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th></th>
            <th>用户信息</th>
            <th>医生医院</th>
            <th>留言内容</th>
            <th>症状或医生诊断</th>
            <th>产品名称</th>
            <th>创建时间</th>
            <th>状态</th>
            <!--th>操作</th-->
        </tr>
        </thead>
        <tbody>
        <foreach name="messageboxList" item="vo">
            <tr>
                <td>{$vo.messagebox_id}</td>
                <td style="min-width: 150px" width="150px">姓名：{$vo.nickname}<br>电话：{$vo.number}<br/>
                    <if condition="$vo.fullname eq ''">
                        微信号：{$vo.wechatid}
                        <else/>
                        <a style="color: #FFA451">咨询客户</a>
                    </if>
                </td>
                <td style="min-width: 150px" width="150px">医生：{$vo.doctor_name}<br>医院：{$vo.hospital_name}</td>
                <td>{$vo.message_content}</td>
                <if condition="$vo.fullname eq ''">
                    <td style="min-width: 250px">{$vo.diagnosis}</td>
                    <td style="min-width: 200px" width="200px">{$vo.product_name} x {$vo.count}<br>
                        <!--if condition="$vo.count gt 0">
                            <a class="btn btn-info"
                               href='{:U("messagebox/viewOrder",array("customer_id"=>$vo["customer_id"],"product_id"=>$vo["product_id"],"category_id"=>$vo["category_id"]))}'>查看订单</a>
                        </if-->
                    </td>
                    <else/>
                    <td style="min-width: 250px">{$vo.note}</td>
                    <td style="min-width: 200px" width="200px">{$vo.product_list}<br>
                </if>
                <td style="min-width: 100px" width="100px">{$vo.create_time}</td>
                <td style="min-width: 100px" width="100px">{:getEnumString($statusEnum, $vo['status'])}<br><a style="color: #33b835">{$vo['notified']}</a></td>
                <!--td>
                    <a class="btn btn-success"
                       href='{:U("messagebox/viewnotify",array("id"=>$vo["messagebox_id"],"name"=>$vo["nickname"],"doctor"=>$vo["doctor_name"],"hospital"=>$vo["hospital_name"],"product"=>$vo["product_name"],"count"=>$vo["count"]))}'>通知销售</a>
                </td-->
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>